import request from '../../../utile/request.js'
const state={
	categorylist:[],
	subjectInit:[]
}

const mutations={
	SET_CATEGORYLIST_DATA(state,val){
		console.log(val)
		state.categorylist=val
		state.subjectInit=(val[0]||[]).s_list
	}
}

const actions={
	async getExamine({commit}){
		const re =await request("/getCategoryList")
		if(re.code===200){
			commit("SET_CATEGORYLIST_DATA",re.data.category_list)
			console.log(re.data.category_list)
		}
	}
}

const getters={

}

export default {
	state,
	mutations,
	actions,
	getters,
	namespaced: true,
}